The invention relates to a method for displaying the configuration of a workpiece on a graphics display device in an NC (Numerical Control) apparatus used to control a machine for machining the workpiece.
In an NC machining apparatus, the position of a tool for machining a workpiece is instructed with corresponding numerical data derived from calculations. An NC machining apparatus can machine a workpiece in an intricate configuration with ease and with high accuracy, thus providing high productivity.
In general, an NC machining apparatus, as shown in FIG. 1, includes a numerical controller 20 for carrying out calculations based on numerical data commands inputted through a terminal 10, and a machining apparatus 30 controlled by the calculated data of the controller 20. The controller 10 includes an input section 21 to which commands are applied, an arithmetic section 22 for computing commands from the input section 21, a memory section 23 for storing the calculation results of the arithmetic section 22 and the commands from the input section, a control section 24 for controlling the arithmetic operation of the arithmetic section 22, an output section 25 for outputting arithmetic data such as calculation results provided by the arithmetic section 22, and a graphics display section 26 for displaying characters or configuration data inputted to the input section 21, calculation results produced by the arithmetic section 22, and the contents of the memory section 23.
In the machining apparatus 30, a tool 31 is held by a tool holder 32, which is secured to the chuck of a spindle 33. The spindle 33 is rotated by a spindle motor 34 which is controlled by a signal from the output section 25 of the controller 20. A workpiece 40 to be machined is fixed to a table 35 of the machining apparatus 30. In FIG. 1, reference numeral 36 designates a ball screw for moving the table 35 in the direction of the X axis. The ball screw 36 is driven through a gear box 37 by an X-axis feedmotor 38, which is in turn driven by a signal from the output section 25. Similar mechanisms (not shown) as that for moving the table 35 in the direction of the X axis with the ball screw 36 are provided for moving the table 35 in the direction of the Y axis and in the direction of the Z axis. These mechanisms are driven by signals outputted by the output section 25.
In a conventional display system for the configuration display device in such a numerical controller, designated parts of the configuration of a machining apparatus or a workpiece can be displayed. For instance, in the case where a part of a workpiece 40 to be machined with a lathe as shown in FIG. 2 is to be displayed enlarged, it is displayed as a single figure as shown in FIG. 3. In FIG. 3, reference numeral 51 designates the configuration of a workpiece to be machined; 52, the configuration of the workpiece which has been machined; and 53, a display frame which indicates the range of display in the display screen of the configuration display device. The enlarged view of FIG. 3 corresponds to the single figure of the part 54 in FIG. 2 which is defined by the single-dot chain line. A conventional system for enlarging a part of a workpiece for display will be described with reference to the flow chart of FIG. 4.
First, data indicating the configuration of a workpiece to be machined and data corresponding to the configuration of the workpiece which has been machined are inputted by the input section 21 of the controller 20. The data thus inputted is computed by the arithmetic section 22 to obtain configuration data with which the configuration of the workpiece is displayed on the graphics display device 26 shown in FIG. 2.
Then, a viewing point 55 (FIG. 2), indicating the center of an image to be displayed, and a scale factor for the displayed image picture are established (Step 1 in FIG. 4). More specifically, a portion of the image shown in FIG. 2 is selected for enlargement, and the center of the portion thus selected is determined as the viewing point 55. Then, in order to display the enlarged image of the selected portion, a scale factor is determined for the image. For instance in the case where a straight line 100 mm in length is to be displayed at a scale factor of 10 mm/dot, the straight line is displayed with 10 dots, and with a scale factor of 0.5 mm/dot, it is displayed with 200 dots.
Therefore, the display data is scaled according to the scale factor thus determined and with reference to the viewing point previously set (Step 2 in FIG. 2). More specifically, the display data of the configuration shown in FIG. 2 is computed by the arithmetic section 22 to obtain data in a coordinate system the origin of which is the viewing point 55. Then, the numbers of dots are calculated for the display data according to the scale.
Next, according to the numbers of dots thus calculated, the portions of the figure which are to be eliminated from the display frame 53 are removed, that is, clipping of the display data is carried out (Step 3 in FIG. 4). This will become more apparent from FIG. 5. In FIG. 5, a display frame 53 displaying configuration data has a viewing point 61. However, if the viewing point 61 is shifted to a viewing point 62 with the scale factor unchanged, the frame 53 will be shifted to a frame 63. Accordingly, parts 65 and 66 become clipped areas, which are eliminated.
Thereafter, using the display data thus clipped, an enlarged image of the configuration is displayed on the display screen as shown in FIG. 3 (Step 4 in FIG. 4).
In the above-described conventional display system, the enlarged image of only a part of the figure is displayed. Therefore, in the case where it is required to display the enlarged images of a plurality of parts of the figure, the display data (viewing point and scale factor) must be set up for each of the parts to be displayed. This operation is rather troublesome. Furthermore, it is impossible to individually and simultaneously display the enlarged images of the parts to be observed.